package cn.wolfcode.shop.cloud.member.feign;


import cn.wolfcode.shop.cloud.Result;
import cn.wolfcode.shop.cloud.member.domain.User;
import cn.wolfcode.shop.cloud.member.feign.hystrix.MemberFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(name = "member-server",fallback = MemberFeignHystrix.class)
public interface MemberFeignApi {

    @GetMapping("/users/{id}")
    Result<User> get(@PathVariable("id") Long id);

    @RequestMapping("/refreshTime")
    Result<Boolean> refreshTime(@RequestParam("token") String token);
}
